<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="com.ejoysoft.wlanyz.business.Flowanalysis,java.util.ArrayList,com.ejoysoft.common.Constants,com.ejoysoft.common.Format,com.ejoysoft.common.exception.IdObjectException,java.util.Vector,
                 java.util.HashMap" %>
<%@ include file="../include/jsp/head.jsp"%>
<%
try{
	String strId = ParamUtil.getString(request,"strId","");
	if(strId.equals(""))
    	throw new IdObjectException("请求处理的信息id为空！或者已经不存在");
    String where="where strId='"+strId+"'";
    Flowanalysis obj=new Flowanalysis(globa,false);
    Flowanalysis obj0=obj.show(where);
    String  strNetType = ParamUtil.getString(request,"strNetType",obj0.getStrNetType()).trim();
    ArrayList<String> typeList = obj.getAllTypeByName();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<script src="../include/DatePicker/WdatePicker.js"></script>
<title><%=application.getAttribute("APP_TITLE")%></title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #F8F9FA;
}
body,td,th {
	font-size: 9pt;
	color: #111111;
}
-->
</style>

<script src="../include/js/chkFrm.js"></script>
<script language="javascript">

  function chkFrm() {
        if(trim(frm.strCity.value)=="") {
            alert("请输入城市名！！！")
            frm.strCity.focus();
            return false;
        }
        if(trim(frm.strTown.value)=="") {
            alert("请输入县市名！！！")
            frm.strTown.focus();
            return false;
        } 
         if(trim(frm.strNetType.value)=="") {
            alert("请输入网络类型！！！")
            frm.strNetType.focus();
            return false;
        } 
        if(trim(frm.strCorreType.value)=="") {
            alert("请输入网元名称！！！")
            frm.strCorreType.focus();
            return false;
        } 
        if(trim(frm.strCity.value).length>20){
        	alert("城市长度不应大于20位");
        	frm.strCity.focus();
        	return false;	
        }
		 if(trim(frm.strTown.value).length>20){
        	alert("县市长度不应大于20位");
        	frm.strTown.focus();
        	return false;	
        }
        var reg = /^\d+\.{0,1}\d*$/;
        if(trim(frm.strDataFlow.value)==""||trim(frm.strDataFlow.value).match(reg)){	
        }else{
        	alert("请输入正确的数据流量！");
        	frm.strDataFlow.focus();
        	return false;
        }
      
       	frm.submit();
    }
</script>
</head>


<body>
<form name="frm" method="post" action="flow_act.jsp" >
<input type="hidden" name="<%=Constants.ACTION_TYPE%>" value="<%=Constants.UPDATE_STR%>">
<input type="hidden" name=strId value="<%=obj0.getStrId()%>">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><img src="../images/ri_list.jpg" width="14" height="14" align="absbottom" />&nbsp;您现在所在的位置：<font color="#0e7cc9">三网对比分析</font> &gt;流量分析 &gt;修改流量信息</td>
  </tr>
</table>
<br>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>
    <td width="6%" class="listtit1"  style="border-left:1px solid #32a4ea;">&nbsp;业务流量信息修改</td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" class="listd" style="border-left:1px solid #dddddd;border-right:1px solid #dddddd;"><table width="702" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="20" colspan="4">&nbsp;</td>
      </tr>
      <tr>
        <td width="230" align="right">&nbsp;</td>
        <td   align="right" class="tdwz">城       市：</td>
        <td ><input type="text"  class="ipt" name="strCity"     value="<%=obj0.getStrCity()==null?"":obj0.getStrCity() %>"/>
        </td>
        <td ></td>
      </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td align="right" class="tdwz">县      市：</td>
        <td><input name="strTown" type="text"  value="<%=obj0.getStrTown()==null?"":obj0.getStrTown() %>"class="ipt"/></td>
        <td>&nbsp;</td>
      </tr>
       <tr >
       <td align="right">&nbsp;</td>
        <td  align="right" class="tdwz">网络类型：</td>
         <td>
          <select name="strNetType" id="strNetType" class="forms_color1"  >
          <option value="">--请选择--</option>
			 <% for (int j = 0; j <  typeList.size(); j++) {
					String type = typeList.get(j);
					String selected = "";
					if(type !=null){
					if(strNetType!= null && strNetType.equals(type))
						selected = "selected='selected'";
				%>
				<option value="<%=type%>" <%=selected%>>
					<%=type%>
				</option>
				<%
				}
				}
				%>
          </select> </td>
         <td  class="tdwz">&nbsp;</td> 
              
                
              </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td align="right" class="tdwz">网元名称：</td>
        <td><input name="strCorreType" type="text"  value="<%=obj0.getStrCorreType()==null?"":obj0.getStrCorreType() %>"class="ipt"/></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td align="right" class="tdwz">数据流量：</td>
        <td><input name="strDataFlow" type="text" value="<%=obj0.getStrDataFlow()%>" class="ipt" /></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td align="right" class="tdwz">开始时间：</td>
        <td><input name="startTime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'});" class="ipt" value="<%=obj0.getStartTime()==null?"":obj0.getStartTime() %>"/></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td height="50" align="left">&nbsp;&nbsp;</td>
        <td height="50" colspan="2" align="left"><input name="B1" type="button"   value="确  定" onclick="chkFrm()"  class="ipt1" style="cursor:hand"/>
          &nbsp;<input  name="B12" type="reset"  value="取 消" class="ipt2" style="cursor:hand"/>
          &nbsp;<input name="B12" type="button"  onclick="window.location.href='flow_list.jsp';" value="返 回" class="ipt2" style="cursor:hand"/></td>
        </tr>
    </table>
      <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p></td>
  </tr>
</table>

 </form>
</body>
</html>
<%}catch(Exception e){e.printStackTrace();} %>
<%@ include file="../include/jsp/footer.jsp"%>